package com.ftf.tp.blog.infrastructure.mapper.pos;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.util.Date;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author tanghao
 * @date 2022/8/12
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "answer")
public class Answer {
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    /**
     * 问题id
     */
    @TableField(value = "question_id")
    private Long questionId;

    /**
     * 问题标题
     */
    @TableField(value = "question_title")
    private String questionTitle;

    /**
     * 0:所有人可以评论
     * 1:关注我 我关注的 可以评论
     * 2:不可以评论
     */
    @TableField(value = "comment_status")
    private Boolean commentStatus;

    /**
     * 评论数
     */
    @TableField(value = "comment_amount")
    private Integer commentAmount;

    /**
     * 收藏数
     */
    @TableField(value = "collection_amount")
    private Integer collectionAmount;

    /**
     * 点赞数
     */
    @TableField(value = "support_amount")
    private Integer supportAmount;

    /**
     * 热度
     */
    @TableField(value = "hot_amount")
    private Integer hotAmount;

    /**
     * 创建人id
     */
    @TableField(value = "creator_id")
    private Integer creatorId;

    /**
     * 创建人名称
     */
    @TableField(value = "creator_name")
    private String creatorName;

    /**
     * 创建时间
     */
    @TableField(value = "created_time")
    private Date createdTime;

    /**
     * 更新时间
     */
    @TableField(value = "updated_time")
    private Date updatedTime;

    /**
     * 乐观锁
     */
    @TableField(value = "revision")
    private Integer revision;
}